package com.ghy.dto;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author GaoHeYang
 */
@Schema(name="用户登录DTO",description="通过账号密码登录")
@Data
public class LoginByAccountDTO implements Serializable {

    @Schema(description = "登录账号")
    @NotEmpty(message = "登录账号不能为空")
    // @Pattern(regexp = "^[a-zA-Z0-9]{4,10}$", message = "账号须由4到10个字母或数字组成")
    private String username;

    @Schema(description = "登录密码")
    @NotEmpty(message = "登录密码不能为空")
    // @Pattern(regexp = "^[a-zA-Z0-9]{4,20}$", message = "密码须由4到20个字母或数字组成")
    private String password;
}
